package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class AddItemToArray {
	public static void main(String[] argv) {
		String object = "科技与人文";
		String[] array = new String[]{"1", "abc", "level", null,
				"www.tah1986.com", "asdf 123"};
		System.out.println(java.util.Arrays.toString(addToList(object, array)));
	}

	public static String[] addToList(String object, String[] array) {
		String[] ret = new String[array.length + 1];
		for (int i = 0; i < array.length; i++) {
			ret[i] = array[i];
		}
		ret[array.length] = object;
		return ret;
	}
}
